{include file="tinymce_full_tpl.html"}
{if $smarty.get.action=="additem"}
<form action="index.php?module=catalogue&action=additem&fixact=1&id={$id}" method="post">

{elseif $smarty.get.action=="edititem"}
{catalogue action="GETITEM" id="$id" varname="item"}
<form action="index.php?module=catalogue&action=edititem&fixact=1&id={$id}" method="post">
{/if}
<fieldset class="groupbox">
    <legend>Продукт</legend>
	<table border="0" cellpadding="0" cellspacing="2" width="100%">
	<tr><td width="20%">Название</td><td width="80%"><input type="text" name="name" size="30" maxlength="255" value="{$item.name}" style="width: 100%"></td></tr>
	<tr><td>Производитель</td><td>
	{catalogue action="VIEWCOMPANIES" varname="cmpList"}
	<select name="companyId">
		<option value="-1" {if $item.companyId==-1 || $item==""}SELECTED{/if}>---Не задано---</option>
{foreach from=$cmpList[1] item=cmp}
		<option value="{$cmp.id}" {if $item.companyId==$cmp.id}SELECTED{/if}>{$cmp.name}</option>
{/foreach}
	</select></td></tr>
	<tr><td>Картинка</td><td width="*"><input type="text" name="picture" size="30" maxlength="255" value="{$item.picture}" style="width: 100%"></td></tr>
	<tr><td>Короткое описание</td><td width="*"><input type="text" name="shortDescription" size="30" maxlength="255" value="{$item.shortDescription}" style="width: 100%"></td></tr>
	<tr><td colspan="2">Текст<br>
	<textarea cols="" rows="30" name="full_text" style="width: 100%">{$item.full_text}</textarea></td></tr>
	<tr><td></td><td><input type="submit" value="Сохранить изменения" class="btn" checked></td></tr>
	</table>
</fieldset>